package cn.dengta.webapp.user.model;

import cn.dengta.common.model.ValueProxy;
import cn.dengta.common.model.ValueProxyImpl;
import lombok.Getter;

@Getter
public enum ComplainStatus implements ValueProxyImpl<ComplainStatus, Integer> {
	PENDING(0, "待处理", false),
	WARNED(1, "已警告", true),
	IGNORED(2, "已忽略", false),
	FREEZE(3, "已禁用", true),
	;
	public boolean pushNotice;

	ComplainStatus(Integer value, String label, boolean pushNotice) {
		this.value = value;
		this.pushNotice = pushNotice;
		this.proxy = new ValueProxy<>(this, value, label);
	}

	final ValueProxy<ComplainStatus, Integer> proxy;

	public final Integer value;

	public static ComplainStatus[] getValues() {
		return ValueProxy.getCachedArray(ComplainStatus.class, ComplainStatus::values);
	}

	public static ComplainStatus of(Integer value) {
		return PENDING.getValueOf(value);
	}
}
